--------------------------------------------------------------------------------------------------
      name:  <unnamed>
       log:  /Users/pabloguzmanpinto/Dropbox/PAME 3ie/Do-files/Logs/7_Merge 2010-2011-2013.log
  log type:  text
 opened on:  14 Dec 2015, 15:30:38

. 
. 
. ************************************************************************************************
. *** 1. Preparacion de variables 2010
. use "${path_data}/variables2010.dta", clear

. 
. foreach x in  mesp mesp_p C anymesp TT id dependiente independiente trabaja ylaborales numper nu
> cleos sexo edad basica media_inc media superior ydeptes yindeptes fichaps {
  2.         rename `x' `x'2010      
  3. }

. 
. sort id2010

. 
. tempname variables2010 

. save "${path_data}/`variables2010'", replace
(note: file /Users/pabloguzmanpinto/Dropbox/PAME 3ie/Databases/__000000.dta not found)
file /Users/pabloguzmanpinto/Dropbox/PAME 3ie/Databases/__000000.dta saved

. 
. 
. ************************************************************************************************
. *** 2. Pegado con variables 2011
. use "${path_data}/variables2011",clear

. sort id2010

. 
. merge id2010 using "${path_data}/`variables2010'"
(note: you are using old merge syntax; see [D] merge for new syntax)
(label TTlbl already defined)
(label sexolbl already defined)

. 
. drop _merge mesp2010 mesp_p2010 C2010 anymesp2010 TT2010

. 
. ** Updating infomation of Social Security Card score for those not interviewed in 2010
. replace fichaps=fichaps2010 if ind_c2011==.
(231 real changes made)

. 
. 
. 
. save "${path_data}/variables2010_2011",replace
file /Users/pabloguzmanpinto/Dropbox/PAME 3ie/Databases/variables2010_2011.dta saved

. 
. 
. ************************************************************************************************
. *** 5. Preparacion de variables 2011
. 
. foreach x in id dependiente independiente trabaja ylaborales sexo edad basica media_inc media su
> perior ydeptes yindeptes fichaps ht marketing stock cost plan tot_pr dinero_mano ver_inven ver_r
> egistro {
  2.         rename `x' `x'2011      
  3. }

. 
. save "${path_data}/variables2010_2011",replace
file /Users/pabloguzmanpinto/Dropbox/PAME 3ie/Databases/variables2010_2011.dta saved

. 
. ************************************************************************************************
. *** 6. Preparacion de variables 2013
. use "${path_data}/variables2013.dta", clear

. 
. foreach x in id dependiente independiente trabaja ylaborales sexo edad ydeptes yindeptes marketi
> ng stock cost plan tot_pr dinero_mano ver_inven ver_registro totalactivos ht {
  2.         rename `x' `x'2013      
  3. }

. 
. sort id2010

. 
. tempname variables2013

. save "${path_data}/`variables2013'", replace
(note: file /Users/pabloguzmanpinto/Dropbox/PAME 3ie/Databases/__000001.dta not found)
file /Users/pabloguzmanpinto/Dropbox/PAME 3ie/Databases/__000001.dta saved

. 
. ************************************************************************************************
. *** 7. Pegado con variables 2010 y 2011
. use "${path_data}/variables2010_2011",clear

. sort id2010

. 
. merge id2010 using "${path_data}/`variables2013'"
(note: you are using old merge syntax; see [D] merge for new syntax)
(note: variable id2010 was int, now double to accommodate using data's values)
(note: variable id2011 was int, now double to accommodate using data's values)
(label sexolbl already defined)

. drop _merge

. 
. save "${path_data}/variables2010_2011_2013",replace
file /Users/pabloguzmanpinto/Dropbox/PAME 3ie/Databases/variables2010_2011_2013.dta saved

. 
. 
. erase "${path_data}/`variables2010'.dta"

. erase "${path_data}/`variables2013'.dta"

. 
. log close
      name:  <unnamed>
       log:  /Users/pabloguzmanpinto/Dropbox/PAME 3ie/Do-files/Logs/7_Merge 2010-2011-2013.log
  log type:  text
 closed on:  14 Dec 2015, 15:30:39
--------------------------------------------------------------------------------------------------
